//
//  MXSegmentedPager+BL.m
//  BasketBallLeagues
//
//  Created by kenshin on 21/05/2017.
//  Copyright © 2017 kenshin. All rights reserved.
//

#import "MXSegmentedPager+BL.h"

@implementation MXSegmentedPager (BL)

- (void)bl_defaultConfig {
    self.segmentedControl.selectionIndicatorLocation = HMSegmentedControlSelectionIndicatorLocationDown;
    self.segmentedControl.backgroundColor = [UIColor clearColor];
    self.segmentedControl.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor jc_colorWithHexString:@"#b2b2ba"], NSFontAttributeName : [UIFont systemFontOfSize:14]};
    self.segmentedControl.selectedTitleTextAttributes = @{NSForegroundColorAttributeName : [BLColorConfig mainColor], NSFontAttributeName : [UIFont systemFontOfSize:15]};
    self.segmentedControl.selectionStyle = HMSegmentedControlSelectionStyleFullWidthStripe;
    self.segmentedControl.selectionIndicatorColor = [BLColorConfig mainColor];
    self.segmentedControl.selectionIndicatorHeight = 2;
    
    self.segmentedControl.segmentWidthStyle = HMSegmentedControlSegmentWidthStyleFixed;
    self.segmentedControl.segmentEdgeInset = UIEdgeInsetsMake(0, -120, 0, -120);
    
    UIView *segmentedControlContainerView = [UIView new];
    segmentedControlContainerView.backgroundColor = [UIColor whiteColor];
    
    UIView *segmentedTopLine = [UIView new];
    segmentedTopLine.backgroundColor = [BLColorConfig lineColor];
    [segmentedControlContainerView addSubview:segmentedTopLine];
    [segmentedTopLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.mas_equalTo(0);
        make.height.mas_equalTo(1/[UIScreen mainScreen].scale);
    }];
    
    UIView *segmentedBottomLine = [UIView new];
    segmentedBottomLine.backgroundColor = [BLColorConfig lineColor];
    [segmentedControlContainerView addSubview:segmentedBottomLine];
    [segmentedBottomLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.mas_equalTo(0);
        make.height.mas_equalTo(1/[UIScreen mainScreen].scale);
    }];
//    self.customSegmentedControlContainerView = segmentedControlContainerView;
    
}

@end
